import request from '@/utils/request'

// 库区分页查询
export const getAreaList = (params: any) =>
  request({
    url: '/area/pageDetail',
    method: 'get',
    params
  })

// 库区详情
export const getAreaListDetails = (id: any) =>
  request({
    url: `/area/${id}`,
    method: 'get'
  })

// 删除仓库
export const deleteArea = (params: any) =>
  request({
    url: '/area',
    method: 'delete',
    params
  })
// 新增库区
export const addArea = (data: any) =>
  request({
    url: '/area',
    method: 'post',
    data
  })
// 编辑库区
export const updateArea = (data: any) =>
  request({
    url: '/area',
    method: 'put',
    data
  })

// 库区查询 --不分页
export const getAllAreaList = (params: any) =>
  request({
    url: '/area/list',
    method: 'get',
    params
  })

// 查询库区总览
export const getAreaOverview = (id: any) =>
  request({
    url: `/area/overview/${id}`,
    method: 'get'
  })
